package com.bbs.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.bbs.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {
    @Select("SELECT username FROM t_user WHERE user_id = #{id}")
    String getUsernameById(String id);

    @Select("SELECT user_id FROM t_user WHERE username = #{username}")
    String getIdByUsername(String username);
}
